home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / 80x0393.zip / CMOS.TXT < prev    next >
Internet Message Format  |  1993-06-20  |  3KB

  1. From: James Vahn
  2. Subj: Cmos
  3. ____________________________________________________________________________
  4.  
  5. The standard AT CMOS addresses from 00h to 3Fh are easy,
  6.  
  7. ;    Read CMOS
  8. mov al,addr     ; 'addr' ranges from 00h to 3Fh.
  9. out 70h,al      ;  wakes up the port.
  10. jmp $+2         ;  a delay loop..
  11. in al,71h       ;  reads CMOS.
  12.  
  13. ;    Write CMOS
  14. mov al,addr     ; 'addr' ranges from 00h to 3Fh.
  15. out 70h,al      ;  wakes up the port.
  16. jmp $+2         ;  a delay loop..
  17. out 71h, value  ;  Writes 'value' from 00h to FFh.
  18.                 ;    note that 'addr' 10h to 20h are checksummed.
  19.  
  20.  
  21. Some CMOS info...
  22.  
  23.   addr        contents
  24.  
  25.   00h         Seconds
  26.   01h         Second Alarm
  27.   02h         Minutes
  28.   03h         Minute Alarm
  29.   04h         Hours
  30.   05h         Hour Alarm
  31.   06h         Day of the Week
  32.   07h         Day of the Month
  33.   08h         Month
  34.   09h         Year
  35.   0Ah         Status Register A
  36.   0Bh         Status Register B
  37.   0Ch         Status Register C
  38.   0Dh         Status Register D
  39.   0Eh         Diagnostic Status Byte
  40.   0Fh         Shutdown Status Byte
  41.   10h         Disk Drive Type for Drives A: and B:
  42.               The drive-type bytes use bits 0:3 for the first
  43.               drive and 4:7 for the other disk drive types.
  44.   00h         no drive present
  45.   01h         double sided 360k
  46.   02h         high capacity (1.2 meg)
  47.   03h-0Fh     reserved
  48.   11h         (AT):Reserved    (PS/2):drive type for hard disk C:
  49.   12h         (PS/2):drive type for hard disk D:
  50.               (AT, XT/286):hard disk type for drives C: and D:
  51.   Format of drive-type entry for AT, XT/286:
  52.   0       number of cyls in drive (0-1023 allowed)
  53.   2       number of heads per drive (0-15 allowed)
  54.   3       starting reduced write compensation (not used on AT)
  55.   5       starting cylinder for write compensation
  56.   7       max. ECC data burst length, XT only
  57.   8       control byte
  58.   Bit
  59.   7       disable disk-access retries
  60.   6       disable ECC retries
  61.   5-4     reserved, set to zero
  62.   3       more than 8 heads
  63.   2-0     drive option on XT (not used by AT)
  64.   9       timeout value for XT (not used by AT)
  65.   12      landing zone cylinder number
  66.   14      number of sectors per track (default 17, 0-17 allowed)
  67.   13h         Reserved
  68.   14h         Equipment Byte (corresponds to sw. 1 on PC and XT)
  69.   15h-16h     Base Memory Size      (low,high)
  70.   17h-18h     Expansion Memory Size (low,high)
  71.   19h-20h     Reserved
  72.           (PS/2) POS information Model 50 (60 and 80 use a 2k
  73.           CMOS RAM that is not accessible through software)
  74.   21h-2Dh     Reserved (not checksumed)
  75.   2Eh-2Fh     Checksum of Bytes 10 Through 20  (low,high)
  76.   30h-31h     Exp. Memory Size as Det. by POST (low,high)
  77.   32h         Date Century Byte
  78.   33h         Information Flags (set during power-on)
  79.   34h-3Fh     Reserved - Put Your Name Here.
  80.